<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<head>
    <meta charset="UTF-8">
    <title>竞赛题目</title>
    <script src="${pageContext.request.contextPath}/dist/jquery/jquery-3.4.1.min.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/dist/bootstrap/css/bootstrap.css">
    <script src="${pageContext.request.contextPath}/dist/bootstrap/js/bootstrap.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/dist/editOnline/lib/codemirror.css">
    <script src="${pageContext.request.contextPath}/dist/editOnline/lib/codemirror.js"></script>
    <script src="${pageContext.request.contextPath}/dist/editOnline/mode/javascript/javascript.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/dist/editOnline/addon/fold/foldgutter.css">
    <script src="${pageContext.request.contextPath}/dist/editOnline/addon/fold/brace-fold.js"></script>
    <script src="${pageContext.request.contextPath}/dist/editOnline/addon/fold/comment-fold.js"></script>
    <script src="${pageContext.request.contextPath}/dist/editOnline/addon/fold/foldcode.js"></script>
    <script src="${pageContext.request.contextPath}/dist/editOnline/addon/fold/foldgutter.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/dist/editOnline/theme/idea.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/contestCompile.css">
    <script src="${pageContext.request.contextPath}/dist/editOnline/mode/clike/clike.js"></script>
</head>
<body>
<jsp:include page="../public/header.jsp"/>
<div class="content-wrapper">
    <div id="base_content">
        <div class="container">
            <div class="row" style="overflow: hidden">
                <div class="col-md-12">
                    <!--题目名-->
                    <div class="question_title clearfix">
                        <h3>
                            <span>${program.programId}.</span><span>${program.programTitle}</span>
                        </h3>
                        <div class="top_button pull-right">
                            <div class="btn_group right_pad">
                                <a class="btn-success btn" id="return">返回竞赛</a>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-8 topAndTips">
                        <h4>题干信息：</h4>
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            ${program.programDesc}
                        </div>
                    </div>
                    <div class="col-md-8 topAndTips">
                        <h4>提示信息：</h4>
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            ${program.programAnsThink}
                        </div>
                    </div>
                    <div class="col-md-8 topAndTips">
                        <h4>输入示例：</h4>
                        <div class="col-md-12 col-sm-12 col-xs-12"  id="inputExample">${program.programInputExample}</div>
                    </div>
                    <div class="col-md-8 topAndTips" >
                        <h4>输出示例：</h4>
                        <div class="col-md-12 col-sm-12 col-xs-12" id="outputExample">${program.programOutputExample}</div>
                    </div>
                </div>
            </div>
            <div class="row" id="editCode">
                <div class="col-md-12">
                    <div class="dropdown col-md-5 col-sm-5 col-xs-5">
                        <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" style="width: 150px" aria-expanded="true">
                            <span id="choiceLanguage">C</span>
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" aria-labelledby="dropdownMenu1" style="text-align: center">
                            <li><a href="javascript:void 0" class="language">C</a></li>
                            <li><a href="javascript:void 0" class="language">C++</a></li>
                            <li><a href="javascript:void 0" class="language">Java</a></li>
                            <li><a href="javascript:void 0" class="language">JavaScript</a></li>
                        </ul>
                    </div>
                    <div class="row col-md-7 col-sm-7 col-xs-7">
                        <div class="col-md-3 col-md-offset-6 col-sm-6 col-xs-6"><button type="button" class="btn btn-info" id="getRecentCode">获取最近执行的代码</button></div>
                        <div class="col-md-3 col-sm-6 col-xs-6" style="padding-left: 50px;"><button type="button" class="btn btn-info" id="backDefault">还原默认代码</button></div>
                    </div>

                </div>
                <div class="col-md-12 col-sm-12 col-xs-12" style="margin-top: 10px">
                    <textarea name="app" id="app" cols="30" rows="10">

                    </textarea>
                </div>
                <div class="col-md-6 col-md-offset-3 col-sm-6 col-sm-offset-3" style="margin-top: 10px">
                    <div class="col-md-6 col-md-offset-3 col-sm-6 col-sm-offset-3">
                        <div class="col-md-5 col-md-offset-2 col-sm-5 col-sm-offset-2 col-xs-5 col-xs-offset-2"><button type="button" class="btn btn-default" id="performBtn">执行代码</button></div>
                        <div class="col-md-5 col-sm-5 col-xs-5"><button type="button" class="btn btn-primary" id="submitBtn">提交代码</button></div>
                    </div>
                </div>
                <div class=""></div>
            </div>
        </div>
    </div>
</div>
<script>
    let sendContent = {
        "input": ["${program.programInputExample}"],
        "output": ["${program.programOutputExample}"],
        "timeLimit": "1000",
        "memoryLimit": "65535",
        "judgeId": 1,
        "src": null
    };
    var returnType = "${program.programReturnType}";
    var params="${program.programParams}";
    var programId="${program.programId}";
    var contestMsgId="${sessionScope.contestMessageId}";
</script>
<script src="${pageContext.request.contextPath}/js/contestCompile.js"></script>
<jsp:include page="../public/footer.jsp"/>
</body>